﻿using FluentMigrator;
using FluentMigrator.Runner.Extensions;

namespace ProgressTracker.Data.Migrations.SeedData
{
    [Profile("Development")]
    public class AddData : Migration
    {
        public override void Up()
        {
            Insert.IntoTable("Users").WithIdentityInsert()
                .Row(new
                {
                    Id = 1,
                    Email = "fake@fake.com",
                    PasswordHash = "$2a$10$W52i0Z6oare63dCVmeIkiOMDefPOH8GearDtRQ3SeTFvUAE4ueCFq" //hash for 'fake'
                }
                );

            Insert.IntoTable("Tasks")
                .Row(new
                {
                    Name = "Work Out",
                    Description = "At least 20 min of Cardio or Strength Training",
                    UserId = 1
                })
                .Row(new
                {
                    Name = "Side Project",
                    Description = "Work on those projects you always wanted to spend time on",
                    UserId = 1
                });
        }

        public override void Down()
        {
            //not using
        }
    }
}
